package com.heima.user.controller.v1;


import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.user.dtos.UserRealnameDto;
import com.heima.user.service.ApUserRealnameService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/v1/auth/")
public class ApUserRealnameController {

    @Autowired
    private ApUserRealnameService userRealnameService;

    /**
     * 分页查询用户认证列表
     * @param dto 数据
     * @return 认证数据表
     */
    @PostMapping("/list")
    public ResponseResult listAll(@RequestBody UserRealnameDto dto){
        return  userRealnameService.listAll(dto);
    }

    /**
     * 审核失败
     * @param dto 数据
     * @return 认证数据表
     */
    @PostMapping("/authFail")
    public ResponseResult authFail(@RequestBody UserRealnameDto dto){
        return  userRealnameService.authFail(dto);
    }


    /**
     * 审核通过
     * @param dto 数据
     * @return 认证数据表
     */
    @PostMapping("/authPass")
    public ResponseResult authPass(@RequestBody UserRealnameDto dto){
        return  userRealnameService.authPass(dto);
    }


}
